define([
    "underscore",
    "backbone",
    "js/page/view/main/mainPageView",
    "js/page/view/main/mainListView",
    "js/page/view/main/mainTopView"
], function (_, Backbone, mainPageView, mainListView, mainTopView) {
    'use strict';

    var view = {};

    var init = function (page) {
        view = new mainPageView(page);
        // var toptemp = new mainTopView();
        // view.$el.empty();
        // view.$el.prepend(toptemp.render().el);
        // for (let i = 0; i < 40; i++) {
        //     var listtemp = new mainListView({index: i});
        //     view.$el.append(listtemp.render().el);
        // }
    };

    return {
        needMode: {
            user: false,
            gameUser: false
        },
        init: function () {
            init(this);
        },
        remove: function () {
            if (view) {
                view.remove();
            }
        },
    };
});